package com.my.chapter7;

public class practice16 {
    public static void main(String[] args) {
        Frog f= new Frog();
        Amphibian a = (Amphibian) f;
        a.play();
        //a.display();
        f.display();
    }
}

class Amphibian{
    void play(){
        System.out.println("Amphibian play()");
    }
}

class Frog extends Amphibian{
    void display(){
        System.out.println("Frog display()");
    }
}
